package com.ibeeking.found.cop.service.common.enums;

/**
 * @Description:
 * @Author ibeeking
 * @Date 2022/1/24 13:57
 **/
public enum EmployeeFieldEnum {
    FIELD1(1, "field1", 2),
    FIELD2(2, "field2", 2),
    FIELD3(3, "field3", 2),
    FIELD4(4, "field4", 2),
    FIELD5(5, "field5", 2),
    FIELD6(6, "field6", 2),
    FIELD7(7, "field7", 2),
    FIELD8(8, "field8", 2),
    FIELD9(9, "field9", 2),
    FIELD10(10, "field10", 2),
    ;

    public static final Integer TYPE_SYSTEM = 1;
    public static final Integer TYPE_CUSTOM = 2;

    private Integer code;
    private String name;
    private Integer type;


    EmployeeFieldEnum(Integer code, String name, int type) {
        this.code = code;
        this.name = name;
        this.type = type;
    }


    public Integer getCode() {
        return code;
    }

    public Integer getType() {
        return type;
    }

    public String getName() {
        return name;
    }

    public static EmployeeFieldEnum getEnum(Integer code) {
        for (EmployeeFieldEnum enumObj : values()) {
            if (enumObj.getCode().equals(code)) {
                return enumObj;
            }
        }
        return null;
    }
}
